package com.zzq.domain.bo;

import com.zzq.domain.dto.SmilePhotographerKpiDTO;
import com.zzq.enumerate.DividendTypeEnum;
import com.zzq.util.BeanCopyUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = false)
public class SmilePhotographerKpiBO {
    private Long photographerId;


    /**
     * 点拍拍摄数量
     */

    private Integer shootRecordNum;

    /**
     * 结算相册数量
     */

    private Integer shootphotoNum;
    /**
     * 收入
     */
    private BigDecimal income;
    /**
     * 点拍分红比例
     */
    private BigDecimal dividendProportion;
    /**
     * 点拍营业额
     */
    private BigDecimal shootAmount;
    /**
     * 分红类型
     */
    private String photographerDividendType;


    public void setShootRecordNum(Integer shootRecordNum) {

        if (this.photographerDividendType.equals(DividendTypeEnum.SHOOT_DIVIDEND.getName())) {
            this.shootRecordNum = shootRecordNum;
        }

    }

    public void setShootphotoNum(Integer shootphotoNum) {
        if (this.photographerDividendType.equals(DividendTypeEnum.SHOOT_DIVIDEND.getName())) {
            this.shootphotoNum = shootphotoNum;
        }

    }

    public void setShootAmount(BigDecimal shootAmount) {

        if (this.photographerDividendType.equals(DividendTypeEnum.SHOOT_DIVIDEND.getName())) {
            this.shootAmount = shootAmount;
        }

    }

    public SmilePhotographerKpiBO(String photographerDividendType, SmilePhotographerKpiDTO smilePhotographerKpiDTO) {
        this.photographerDividendType = photographerDividendType;
        BeanCopyUtils.copyBean(smilePhotographerKpiDTO,this.getClass());

    }
}
